﻿using System;
using System.Collections.Generic;
using System.Text;
using Animals.Model;
using Dogs.Business;

namespace Dogs
{
    public class ParentsFacadeImpl
    {
        public static bool hasChildren(Animal animal)
        {
            foreach (Animal animalLocal in AnimalsHolder.Animals)
            {
                if (animalLocal.Parents.FatherId == animal.Id || animalLocal.Parents.MotherId == animal.Id)
                {
                    return true;
                }
            }
            return false;
        }

        public static bool hasParents(Animal animal)
        {
            foreach (Animal animalLocal in AnimalsHolder.Animals)
            {
                if (animal.Parents.MotherId == animalLocal.Id || animal.Parents.FatherId == animalLocal.Id)
                {
                    return true;
                }
            }
            return false;
        }
    }
}
